package com.xc.hotelmgr.datapusherali.service.mybatis.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xc.hotelmgr.datapusherali.mapper.HtLogicRoomMapper;
import com.xc.hotelmgr.datapusherali.pojo.mybatis.HtLogicRoom;
import com.xc.hotelmgr.datapusherali.service.mybatis.HtLogicRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HtLogicRoomServiceImpl extends ServiceImpl<HtLogicRoomMapper, HtLogicRoom> implements HtLogicRoomService {

    @Autowired
    private HtLogicRoomMapper htLogicRoomMapper;

    @Override
    public List<HtLogicRoom> listAll() {
        return htLogicRoomMapper.listAll();
    }

    @Override
    public HtLogicRoom getById(Long id) {
        return htLogicRoomMapper.getById(id);
    }

    @Override
    public int insert(HtLogicRoom htLogicRoom) {
        return htLogicRoomMapper.insert(htLogicRoom);
    }

    @Override
    public int insertIgnoreNull(HtLogicRoom htLogicRoom) {
        return htLogicRoomMapper.insertIgnoreNull(htLogicRoom);
    }

    @Override
    public int update(HtLogicRoom htLogicRoom) {
        return htLogicRoomMapper.update(htLogicRoom);
    }

    @Override
    public int updateIgnoreNull(HtLogicRoom htLogicRoom) {
        return htLogicRoomMapper.updateIgnoreNull(htLogicRoom);
    }

    @Override
    public int delete(HtLogicRoom htLogicRoom) {
        return htLogicRoomMapper.delete(htLogicRoom);
    }

    @Override
    public HtLogicRoom selectRpRs(Long room_code, Long rp_code) {
        return htLogicRoomMapper.selectRpRs(room_code, rp_code);
    }

    @Override
    public List<HtLogicRoom> selectByHotelCode(Long hotelCode) {
        return htLogicRoomMapper.getByHotelCode(hotelCode);
    }

    @Override
    public List<HtLogicRoom> selectRpCodeByHotelCode(Long hotelId) {

        return baseMapper.selectRpCodeByHotelCode(hotelId);
    }
}
